package com.yb.core.annotation;

import cn.hutool.core.util.DesensitizedUtil;
import com.yb.core.annotation.repeatable.Desensitizes;

import java.lang.annotation.*;

/**
 * Copyright (C), 2022-2022, 姚兵
 * Author: 32210
 * Date: 2022/12/9 15:56
 * FileName: Desensitization
 * Description: 数据脱敏
 */

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Repeatable(value = Desensitizes.class)
public @interface Desensitize {
    DesensitizedUtil.DesensitizedType type() default DesensitizedUtil.DesensitizedType.MOBILE_PHONE;
    String[] fields() ;//指定哪个字段
}
